<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>IGNORED</title>
        <h:outputStylesheet name="css/jsfcrud.css"/>
<!--            <link type="text/css" rel="stylesheet" href="#{request.contextPath}/themes/uel/theme.css"/>-->
    </h:head>
    <h:body>
        <ui:composition template="/private/template/default_layout.xhtml">
            <ui:define name="titulo">
                Login
            </ui:define>
            <ui:define name="content">
                <script type="text/javascript">
                    function submete(){
                        document.getElementById('username').value = document.getElementById('inputUsername').value;
                        document.getElementById('password').value = document.getElementById('inputPassword').value;
                        document.getElementById('authform').submit();
                    }
                </script>
                <form id="authform" method="POST" action="j_security_check">
                    <input id="username" type="hidden" name="j_username" />
                    <input id="password" type="hidden" name="j_password" />
                </form>

                <h:form prependId="false" id="formLogin">
                    <center>
                        <br/> <br/><br/><br/><br/><br/><br/><br/>
                        <p:panel id="login_panel" header="Autenticação" style="width: 330px">

                            <div id="login_div" align="left">
                                <h:panelGrid id="login_grid" columns="2" >
                                        <h:outputLabel value="Matrícula:"/>
                                        <h:panelGrid columns="1">
                                            <p:inputText id="inputUsername" style="width: 140px;" required="true"/>
                                    </h:panelGrid>
                                    <h:outputLabel value="Senha:"/>
                                    <h:panelGrid columns="2" >
                                        <p:keyboard id="inputPassword"   label="Abra o teclado" required="true" title="Para Maior Segurança Utilize o Teclado Virtual" style="width: 140px;" clearLabel="Limpa" closeLabel="Fecha" backspaceLabel="&larr;"    password="true"  />
                                        <p:commandButton id="login_button" value="Entrar" onclick="if (#{facesContext.maximumSeverity==null}) {submete();}"/>
                                    </h:panelGrid>
                                </h:panelGrid>
                            </div>
                        </p:panel>
                    </center>
                </h:form>
            </ui:define>
        </ui:composition>

    </h:body>

</html>

